<link href="__INDEX__css/main.css" rel="stylesheet" type="text/css" />
<style>
    .mww{
        color: #144D9E;!important;
    }
</style>
<header id="header" class="header">
    <div class="header__top" style="background-color:#FFF">
        <div class="container">
            <div class="row">
                <div class="col-sm-12">
                    <div class="wrap-logo" style="padding:5px;float: left;">
                        <a href='{:url("index/Index/index")}' class="logo" style="float: left;"></a>
                        <a class="mmm hidden" href='{:url("index/Index/index")}' style="float: left;line-height: 80px;font-size: 12px;color: #144D9E;text-decoration:none;font-weight: bold;letter-spacing: 2px;">全国高校国防教育社团自训教官联盟</a>
                        <a class="ppp" href='{:url("index/Index/index")}' style="float: left;line-height: 80px;font-size: 30px;color: #144D9E;text-decoration:none;font-weight: bold;letter-spacing: 2px;">全国高校国防教育社团自训教官联盟</a>
                    </div>
                </div>
                <!--<div class="col-sm-offset-2 col-md-offset-5 col-sm-6 col-md-4 hidden-xs">-->
                    <!--<div class="col-xs-4 col-sm-5">-->
                        <!--<div class="weather">-->
                            <!--<div class="weather__temperature">-->
                                <!--<span class="icon-sun"></span>-->
                                <!--<em class="active">+8 C</em>-->
                                <!--<em>+2 C</em>-->
                                <!--<em>+3 C</em>-->
                            <!--</div>-->
                            <!--<div class="weather__city">-->
                                <!--<em>London</em>-->
                                <!--<div class="weather__city__list">-->
                                    <!--<ul>-->
                                        <!--<li class="active">-->
                                            <!--<a href="#">London</a>-->
                                        <!--</li>-->
                                        <!--<li>-->
                                            <!--<a href="#">Moscow</a>-->
                                        <!--</li>-->
                                        <!--<li>-->
                                            <!--<a href="#">Kiev</a>-->
                                        <!--</li>-->
                                    <!--</ul>-->
                                <!--</div>-->
                            <!--</div>-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="col-xs-6 col-sm-7">-->
                        <!--<div class="exchange">-->
                            <!--<p class="exchange__name">Central Bank Rate</p>-->
                            <!--<p class="exchange__course">-->
                                <!--$<span>32.32</span>&#8364;<span>28.23</span>-->
                            <!--</p>-->
                        <!--</div>-->
                    <!--</div>-->
                <!--</div>-->
            </div>
        </div>
    </div>
    <div class="wsmenucontent overlapblackbg"></div>
    <div class="wsmenuexpandermain slideRight">
        <a id="navToggle" class="animated-arrow slideLeft">
            <span></span>
        </a>
    </div>
    <div class="header_down" style="background-color:#144D9E ">
        <div class="container">
            <div class="wrapper clearfix bigmegamenu">
                <!--Main Menu HTML Code-->
                <nav class="wsmenu slideLeft clearfix">
                    <ul class="mobile-sub wsmenu-list">
                        <li class="visible-xs">
                            <form class="navbar-form mob_search" role="search">
                                <div class="form-group">
                                    <input type="text" class="form-control idcardgetmass" placeholder="输入身份证号查询所在社团">
                                </div>
                                <button type="button" class="btn btn-search" onclick="tanRes(this);">
                                    <i class="icon-search"></i>
                                </button>
                            </form>
                        </li>

                        <li class="active">
                            <span class="wsmenu-click" onclick="location.href='/index/Index/index';"></span>
                            <a href='{:url("index/Index/index")}' style="color: #FFF">首页</a>
                        </li>
                        <li>
                            <span class="wsmenu-click"></span>
                            <a href="" style="color: #FFF">关于我们
                                <span class="arrow"></span>
                            </a>
                            <ul class="wsmenu-submenu">
                                <li>
                                    <a href="{:url('index/Other/guWen')}">顾问团</a>
                                </li>
                                <li>
                                    <a href="{:url('index/Other/jiGou')}">机构团队介绍</a>
                                </li>
                                <li>
                                    <a href="{:url('index/Other/lianM')}">联盟介绍</a>
                                </li>
                                <li>
                                    <a href="{:url('index/Other/company')}">发起单位</a>
                                </li>
                                <li>
                                    <a href="{:url('index/Other/mass')}">社团列表</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <span class="wsmenu-click"></span>
                            <a href="" style="color: #FFF">政策解读
                                <span class="arrow"></span>
                            </a>
                            <ul class="wsmenu-submenu">
                                {volist name='zctypes' id='zc'}
                                <li>
                                    <a href="{:url('index/Zhengce/zcList')}?zc_type={$zc.zt_id}">{$zc.zt_name}</a>
                                </li>
                                {/volist}
                            </ul>
                        </li>
                        <li>
                            <span class="wsmenu-click"></span>
                            <a href="" style="color: #FFF">联盟资讯
                                <span class="arrow"></span>
                            </a>
                            <ul class="wsmenu-submenu">
                                {volist name='lmtypes' id='lm'}
                                <li>
                                    <a href="{:url('index/Information/informationList')}?information_type={$lm.it_id}">{$lm.it_name}</a>
                                </li>
                                {/volist}
                            </ul>
                        </li>
                        <li>
                            <span class="wsmenu-click"></span>
                            <a href="" style="color: #FFF">联盟起源
                                <span class="arrow"></span>
                            </a>
                            <ul class="wsmenu-submenu">
                                <li>
                                    <a href="{:url('index/Other/history')}">自训历史</a>
                                </li>
                                <li>
                                    <a href="{:url('index/Other/anL')}">自训案例</a>
                                </li>
                                <li>
                                    <a href="{:url('index/Other/bigMeet')}">联盟成立大会</a>
                                </li>
                                <li>
                                    <a href="{:url('index/Other/gongX')}">贡献榜</a>
                                </li>
                            </ul>
                        </li>
                        <li>
                            <span class="wsmenu-click"></span>
                            <a href="{:url('index/Other/contactUs')}" style="color: #FFF">联系我们</a>
                        </li>
                        <li>
                            <span class="wsmenu-click"></span>
                            <a href="" style="color: #FFF">下载区
                                <span class="arrow"></span>
                            </a>
                            <ul class="wsmenu-submenu">
                                <li>
                                    <a href="{:url('index/Other/xiangShao')}">响哨APP</a>
                                </li>
                                <li>
                                    <a href="{:url('index/Uploadfile/filesList')}">下载</a>
                                </li>
                            </ul>
                        </li>

                        <li class="navbar-right hidden-xs">
                            <form class="navbar-form" role="search">
                                <div class="form-group">
                                    <input type="text" class="form-control idcardgetmass" placeholder="输入身份证号查询所在社团">
                                </div>
                                <button type="button" class="btn btn-search" onclick="tanRes(this);">
                                    <i class="icon-search"></i>
                                    <br/><span style="color: #FFF">查询</span>
                                </button>
                            </form>
                        </li>
                        <li>

                        </li>
                    </ul>
                </nav>
                <!--Menu HTML Code-->
            </div>
        </div>
    </div>
</header>
<!--单独审核弹窗start-->
<style>
    .container_one{
        width:520px;
        height:200px;
        background:#fff;
        box-shadow:0px 2px 8px 0px rgba(0,0,0,0.2);
        border-radius:5px 4px 4px 4px;
        position: absolute;;
        top:0;
        left:0;
        right:0;
        bottom:0;
        margin:auto;
        z-index: 999;
    }
    .btnBox{
        width:100%;
        height:52px;
        position: absolute;;
        bottom:0;
        left:0;
        border-top:1px solid #E9E9E9;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        /*padding-top:10px;*/
    }
    .sure_one{
        width:88px;
        height:32px;
        line-height: 32px;
        text-align: center;
        font-size:14px;
        outline: none;
        border:0;
        margin-left:8px;
    }
    .cancel_one{
        border:1px solid #D9D9D9;
        border-radius:2px;
        background: rgba(0,0,0,0);
        color:#666666;
    }
    .sure_one{
        background:#2A63E7;
        border-radius:2px;
        color:#fff;
    }
    .title{
        height:50px;
        line-height: 50px;
        font-size:16px;
        color:#333;
        padding-left:20px;
        border-bottom:1px solid #E9E9E9
    }
    .content{
        width:480px;
        height:100px;
        background:#fff;
        padding:0 20px;
    }
    .ovfHiden{overflow: hidden;height: 100%;}
</style>
<div class="container_one hidden">
    <div class="title">社团信息</div>
    <div class="content" style="padding-top: 10px">
        <p>社团名字：<span class="ssmz"></span></p>
        <p>我的编码：<span class="ssbm"></span></p>
        <p>所属学校：<span class="ssxx"></span></p>
    </div>
    <div class="btnBox">
        <button class="sure_one" onclick="guanbi();">关闭</button>&nbsp;
    </div>
</div>
<div class="all_div hidden" style="width: 100%;height: 100%;position: absolute;z-index: 100;background: rgba(0,0,0,0.5);top: 0;left: 0;padding: 0;margin: 0;"></div>
<!--单独审核弹窗-end-->
<!--单独审核弹窗start-->
<style>
    .container_one2{
        width:80%;
        height:200px;
        background:#fff;
        box-shadow:0px 2px 8px 0px rgba(0,0,0,0.2);
        border-radius:5px 4px 4px 4px;
        position: absolute;;
        top:0;
        left:0;
        right:0;
        bottom:0;
        margin:auto;
        z-index: 999;
    }
    .btnBox2{
        width:100%;
        height:52px;
        position: absolute;;
        bottom:0;
        left:0;
        border-top:1px solid #E9E9E9;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        /*padding-top:10px;*/
    }
    .sure_one2{
        width:88px;
        height:32px;
        line-height: 32px;
        text-align: center;
        font-size:14px;
        outline: none;
        border:0;
        margin-left:8px;
    }
    .sure_one2{
        background:#2A63E7;
        border-radius:2px;
        color:#fff;
    }
    .title2{
        height:50px;
        line-height: 50px;
        font-size:16px;
        color:#333;
        padding-left:20px;
        border-bottom:1px solid #E9E9E9
    }
    .content2{
        width:80%;
        height:100px;
        background:#fff;
        padding:0 20px;
    }
</style>
<div class="container_one2  hidden">
    <div class="title2">社团信息</div>
    <div class="content2" style="padding-top: 10px">
        <p>社团名字：<span class="ssmz"></span></p>
        <p>我的编码：<span class="ssbm"></span></p>
        <p>所属学校：<span class="ssxx"></span></p>
    </div>
    <div class="btnBox2">
        <button class="sure_one2" onclick="guanbi();">关闭</button>&nbsp;
    </div>
</div>
<!--单独审核弹窗-end-->
<script>
    var ua = navigator.userAgent;
    var ipad = ua.match(/(iPad).*OS\s([\d_]+)/),
        isIphone =!ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),
        isAndroid = ua.match(/(Android)\s+([\d.]+)/),
        isMobile = isIphone || isAndroid;
    //判断
    var ptype = 1;
    if(isMobile){
        ptype = 2;
    }
    function tanRes(el) {
        var keyword = $(el).prev('div').children('input').val().trim();
        var res = cardTrue(keyword);
        if(res == true){
            $.ajax({
                url:'http://mass.xuanwumobile.com/api/Home/pcGetSearchResult',
                type:'post',
                data:{keyword:keyword,user_id:0},
                dataType:'json',
                success:function (data) {
                    if(data.status == 200){
                        if(ptype == 1){
                            $('.container_one,.all_div').removeClass('hidden');
                        }else{
                            $('.container_one2,.all_div').removeClass('hidden');
                        }
                        $('html,body').addClass('ovfHiden');
                        $('.ssmz').text(data.msg.assn_name);
                        $('.ssbm').text(data.msg.assn_code);
                        $('.ssxx').text(data.msg.sc_name);
                    }else{
                        if(ptype == 1){
                            $('.container_one,.all_div').addClass('hidden');
                        }else{
                            $('.container_one2,.all_div').addClass('hidden');
                        }
                        $('html,body').removeClass('ovfHiden');
                        alert(data.msg)
                    }

                }
            });
        }
    }
    function guanbi() {
        $('.container_one,.container_one2,.all_div').addClass('hidden');
        $('html,body').removeClass('ovfHiden');
    }
    function cardTrue(idCard) {
        if(idCard != "") {
            //15位和18位身份证号码的正则表达式
            var regIdCard = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;

            //如果通过该验证，说明身份证格式正确，但准确性还需计算
            if (regIdCard.test(idCard)) {
                if (idCard.length == 18) {
                    var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2); //将前17位加权因子保存在数组里
                    var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2); //这是除以11后，可能产生的11位余数、验证码，也保存成数组
                    var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
                    for (var i = 0; i < 17; i++) {
                        idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
                    }

                    var idCardMod = idCardWiSum % 11;//计算出校验码所在数组的位置
                    var idCardLast = idCard.substring(17);//得到最后一位身份证号码

                    //如果等于2，则说明校验码是10，身份证号码最后一位应该是X
                    if (idCardMod == 2) {
                        if (idCardLast == "X" || idCardLast == "x") {
                            return true;
                            // alert("恭喜通过验证啦！");
                        } else {
                            alert('身份证号码错误');
                            return false;
                        }
                    } else {
                        //用计算出的验证码与最后一位身份证号码匹配，如果一致，说明通过，否则是无效的身份证号码
                        if (idCardLast == idCardY[idCardMod]) {
                            return true;
                            //alert("恭喜通过验证啦！");
                        } else {
                            alert('身份证号码错误');
                            return false;
                        }
                    }
                }
            } else {
                alert('身份证格式不正确');
                return false;
            }
        }else{
            alert('身份证号码不能为空');
            return false;
        }
    }
</script>